package com.century.sjt.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.century.sjt.R;
import com.century.sjt.entity.AboutSJT;
import com.century.sjt.widget.TitleBar.SjtTitleBar;

/**
 * Created by 炳基 on 2016/6/12.
 */
public class AboutSJTJJActivity extends BaseActivity{
    private SjtTitleBar titleBar;
    private RequestQueue mQueue;
    private WebView tvComment;
    private AboutSJT mAboutSJT;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.about_sjt_jj_activity);
        mQueue = Volley.newRequestQueue(this);
        Intent intent = getIntent();
        mAboutSJT=(AboutSJT)intent.getSerializableExtra("aboutSJT");

        initViews();
    }

    private void initViews(){

        titleBar = (SjtTitleBar) findViewById(R.id.about_sjt_title);
        //       标题栏
        titleBar.setTitle(getResources().getString(R.string.tab_about_sjt_introduce));
        titleBar.setLeftIconResource(getResources().getString(R.string.icon_return));
        titleBar.setLeftLayoutClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        tvComment=(WebView) findViewById(R.id.news_detail_webview);
//        tvComment.loadUrl(mAboutSJT.getContent());

        if (mAboutSJT.getContent()==null || "".equals(mAboutSJT.getContent())){
            tvComment.loadDataWithBaseURL("", "","text/html","utf-8","");
        }else {
            tvComment.loadDataWithBaseURL("", mAboutSJT.getContent(),"text/html","utf-8","");
         }
    }




    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initEvent() {

    }

    @Override
    protected void initData() {

    }

}
